package org.tong.configencrypt.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {

    //@Value("${spring.datasource.druid.password}")
    String password;


    @Autowired
    Environment environment;

    @RequestMapping("/")
    public String getConfig() {
        String property = environment.getProperty("spring.datasource.druid.password");
        return String.join(" ", "password", property);
    }
}
